home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / MUSIC1.PAK / PRIORITS.WFM < prev    next >
Text File  |  1995-07-18  |  6KB  |  203 lines

  1. *****************************************************************************
  2. *  PROGRAM:      Priorits.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.29  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This is a form showing possible sales ranking (priorities)
  15. *                breakdowns for the available items in the Musical Methods
  16. *                store.  You can view only a list of the possible sales
  17. *                rankings, or you may choose to view the applicable items
  18. *                for each breakdown.
  19. *
  20. *  PARAMETERS:   None
  21. *
  22. *  CALLS:        Priorits.qbe  (view of tables)
  23. *                Music.cc      (for custom pushbuttons)
  24. *                View.mnu      (menu file)
  25. *                View.pop      (popup file)
  26. *                Music.prg     (procedure file)
  27. *
  28. *  USAGE:        DO Priorits.wfm
  29. *
  30. *******************************************************************************
  31. #include "Music.h"
  32.  
  33. create session
  34. set talk off
  35. set ldcheck off
  36.  
  37. ** END HEADER -- do not remove this line*
  38. * Generated on 06/19/94
  39. *
  40. parameter bModal
  41. local f
  42. f = new PRIORITSFORM()
  43. if (bModal)
  44.    f.mdi = .F. && ensure not MDI
  45.    f.ReadModal()
  46. else
  47.    f.Open()
  48. endif
  49. CLASS PRIORITSFORM OF FORM
  50.    Set Procedure to Music.cc Additive
  51.    this.ReleaseOnClose = .F.
  52.    this.HelpId = "Sales Rankings"
  53.    this.Width =         44.54
  54.    this.View = "PRIORITS.QBE"
  55.    this.Top =          5.52
  56.    this.MenuFile = "VIEW.MNU"
  57.    this.Left =         28.56
  58.    this.Text = "Sales Ranking"
  59.    this.Height =         13.67
  60.    this.OnOpen = CLASS::ONOPEN
  61.    this.OnClose = CLASS::ONCLOSE
  62.    this.ColorNormal = "W"
  63.    this.Minimize = .F.
  64.    this.MousePointer =          1
  65.    this.Maximize = .F.
  66.    this.HelpFile = "Music.hlp"
  67.  
  68.    DEFINE RECTANGLE LISTRECT OF THIS;
  69.        PROPERTY;
  70.          Width         41.82,;
  71.          Top          0.50,;
  72.          Left          1.19,;
  73.          Text "",;
  74.          Height          8.37,;
  75.          Border .T.,;
  76.          BorderStyle          1,;
  77.          ColorNormal "W*/R"
  78.  
  79.    DEFINE TEXT SALESRANKINGTEXT OF THIS;
  80.        PROPERTY;
  81.          Width         17.51,;
  82.          Top          0.72,;
  83.          Left          1.87,;
  84.          Text "Sales Rankings:",;
  85.          Height          1.01,;
  86.          Border .F.,;
  87.          ColorNormal "W/R"
  88.  
  89.    DEFINE MUSICBUTTON ITEMSBUTTON OF THIS;
  90.        PROPERTY;
  91.          HelpID "Items",;
  92.          Width         14.11,;
  93.          Top         11.62,;
  94.          Left         13.60,;
  95.          Text "&Items...",;
  96.          Height          1.50,;
  97.          UpBitmap "RESOURCE #108",;
  98.          ColorNormal "N/W",;
  99.          StatusMessage "Show available items matching the current selection.  Press F1 for Help.",;
  100.          Default .T.,;
  101.          HelpFile "Music.hlp"
  102.  
  103.    DEFINE CLOSEMBUTTON CLOSEFORMBUTTON OF THIS;
  104.        PROPERTY;
  105.          Width         14.11,;
  106.          Top         11.62,;
  107.          Left         28.56,;
  108.          Height          1.50,;
  109.          ColorNormal "N/W"
  110.  
  111.    DEFINE IMAGE LOGOIMAGE OF THIS;
  112.        PROPERTY;
  113.          Width         11.39,;
  114.          Top          9.15,;
  115.          Left          1.19,;
  116.          DataSource "FILENAME SMLMUSIC.BMP",;
  117.          Height          4.04,;
  118.          Alignment          2
  119.  
  120.    DEFINE LISTBOX DESCRIPTLIST OF THIS;
  121.        PROPERTY;
  122.          Visible .F.,;
  123.          Width         39.44,;
  124.          ColorHighLight "W*/R",;
  125.          ID        800,;
  126.          Top          1.73,;
  127.          Left          2.38,;
  128.          DataSource "FIELD PRIORITS->DESCRIPT",;
  129.          Height          6.72,;
  130.          ColorNormal "N/W*"
  131.  
  132.    ****************************************************************************
  133.    PROCEDURE OnOpen
  134.    ****************************************************************************
  135.  
  136.    if _app.framewin.text = MUSIC_APP_TITLE    && If called from Music.prg
  137.       EnableViews(this)                       && enable viewing other items,
  138.       trackWindows.AddWindow(form)            && Keep track of open windows
  139.  
  140.    else                                       && otherwise
  141.       set procedure to Music.prg additive     && Make Music.prg procedure file
  142.    endif
  143.  
  144.    *** Define corresponding items (initially not visible)
  145.    DefineCorrespondingItems(form)
  146.  
  147.    *** View Window Settings
  148.    this.OnSize = SizeForm    && Procedure in music.prg
  149.  
  150.    *** Assign the SpeedMenu for this form
  151.    set procedure to View.pop additive
  152.    this.popupMenu = new ViewPopup(this, "ViewPopup")
  153.  
  154.    *** Menu Settings
  155.    this.root.view.organization.enabled = .F.
  156.    this.root.view.organization.rank.enabled = .F.
  157.    this.root.view.organization.artist.enabled = .F.
  158.    this.root.view.organization.title.enabled = .F.
  159.    this.root.view.browse.enabled = .F.
  160.    this.popupMenu.organization.enabled = .F.
  161.    this.popupMenu.organization.rank.enabled = .F.
  162.    this.popupMenu.organization.artist.enabled = .F.
  163.    this.popupMenu.organization.title.enabled = .F.
  164.    this.popupMenu.browse.enabled = .F.
  165.    this.root.AssignWindowMenu()
  166.  
  167.    * Link listbox to the unSKIPped list of parent records
  168.    this.descriptList.dataSource = "FIELD PRIORITS->DESCRIPT"
  169.    this.descriptList.visible = .T.            && Make it visible here so don't
  170.                                               && See flickering in form
  171.  
  172.    set skip to                                && Parent records shown only once
  173.    this.filter = ""                           && no filter is set yet
  174.  
  175.    this.musicIsOpen = .F.                     && Corresponding items not visible
  176.                                               && yet
  177.  
  178.    this.itemsButton.OnClick = CorrespondingItems  && procedure in Music.prg
  179.  
  180.  
  181.    ****************************************************************************
  182.    PROCEDURE OnClose
  183.    ****************************************************************************
  184.  
  185.    if _app.framewin.text = MUSIC_APP_TITLE
  186.       trackWindows.DeleteWindow(form)
  187.    else
  188.       close procedure Music.prg
  189.    endif
  190.    close procedure Music.cc, View.pop
  191.  
  192.  
  193. ENDCLASS
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.